<template>
	<u-navbar
		left-icon-color="#353535"
		bg-color="#fff"
		:placeholder="placeholder"
		auto-back
	>
		<template #center>
			<view class="back-home" @click="backHome">
				<u-icon name="home-fill" color="#353535" size="50rpx" top="-7rpx"></u-icon>
			</view>
			<view class="title">{{title}}</view>
		</template>
	</u-navbar>
</template>

<script>
	export default {
		name:"custom-navbar",
		props: {
			title: {
				type: String,
				default: '标题'
			},
			placeholder: {
				type: Boolean,
				default: true
			},
		},
		data() {
			return {
				
			};
		},
		methods: {
			backHome(){
				uni.reLaunch({
					url: '/pages/index/index'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.title{
		color: #353535;
		font-size: 30rpx;
		font-weight: bold;
	}
	.back-home{
		position: absolute;
		left: 100rpx;
	}
</style>